package com.finir.fakturisanje.domain.beans.factory;

import java.util.Hashtable;

/*    */ public class DomainFactory
/*    */ {
/*    */   @SuppressWarnings("unchecked")
public <T> T createInstance(Class<T> instanceToCreate)
/*    */   {
/*  9 */     Hashtable hash = DomainHash.getDomainHash();
/* 10 */     Object instance = null;
/*    */     try {
/* 12 */       instance = ((Class)hash.get(instanceToCreate)).newInstance();
/*    */     }
/*    */     catch (InstantiationException e) {
/* 15 */       e.printStackTrace();
/*    */     }
/*    */     catch (IllegalAccessException e) {
/* 18 */       e.printStackTrace();
/*    */     }
/*    */ 
/* 21 */     return (T) instance;
/*    */   }
/*    */ }
